<?php
/**
 * Created by PhpStorm.
 * User: kobe.wang
 * Date: 2019/3/18
 * Time: 15:24
 */
namespace App\Common;

class ElasticSearch
{
    protected $index;//索引
    protected $type;//类型

    protected $client;

    const BASE_URL = 'http://localhost:9200/';

    public function __construct($index, $type)
    {
        $this->index = $index;
        $this->type = $type;
        $this->client = new Client(['base_uri' => self::BASE_URL, 'timeout' => 3]);
    }

    public function createDocument($id,$data)
    {

    }
}